These summaries are based on data at the block group level from the years 1980-2020. Data are also available at the block, tract, and county levels.
meta %>%
filter(su_blkgp == 1) %>%
select(varname, about) %>% as.list()
## $varname
## [1] "STATEFP" "COUNTYFP" "GEOID" "NAMESLAD"
## [5] "CountyName" "year" "June_AvgMaxTF" "July_AvgMaxTF"
## [9] "August_AvgMaxTF" "AvgAnnMaxTemp" "TotpercInch"
##
## $about
## [1] "The federal information processing system (FIPS) codes which are used to identify a geographical location, Virginia is 51"
## [2] "The federal information processing system (FIPS) codes which are used to identify a geographical location, each county has a 3 digit code."
## [3] "The georgraphical ID number of an observation. It is the comnbination of the state FIPS, county FIPS, and the tract, and blockgroup numbers."
## [4] "The georgraphical ID number of an observation"
## [5] "County Name"
## [6] "The data covers years 1980 through 2020"
## [7] "The average maximum temperature for a daily period over the entire monthly period for the month of June. Converted to Fahrenheit during data clean"
## [8] "The average maximum temperature for a daily period over the entire monthly period for the month of July. Converted to Fahrenheit during data clean"
## [9] "The average maximum temperature for a daily period over the entire monthly period for the month of August. Converted to Fahrenheit during data clean"
## [10] "The average maximum temperature for a daily period over the entire year. Converted to Fahrenheit during data clean"
## [11] "The total accumulated precipitation over the monthly period of the daily total precipitation, summed into total yearly precipitation. Sum of all forms of precipitation converted to a water-equivalent depth. Converted to inches during data clean"
glimpse(eastdat)
## Rows: 82
## Columns: 10
## $ GEOID <int> 51001, 51001, 51001, 51001, 51001, 51001, 51001, 51001, …
## $ year <int> 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 19…
## $ STATEFP <int> 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, …
## $ COUNTYFP <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ NAMELSAD <chr> "Accomack County", "Accomack County", "Accomack County",…
## $ June_AvgMaxTF <dbl> 81.16, 84.79, 79.20, 80.26, 83.89, 81.26, 84.13, 83.86, …
## $ July_AvgMaxTF <dbl> 86.56, 86.31, 85.09, 88.25, 83.04, 85.15, 88.73, 88.95, …
## $ Aug_AvgMaxTF <dbl> 86.69, 82.14, 82.09, 85.79, 85.64, 84.22, 82.84, 87.06, …
## $ AvgAnnMaxTF <dbl> 65.69, 65.33, 65.92, 66.34, 66.91, 67.95, 67.44, 66.85, …
## $ TotpercInch <dbl> 35.59, 38.94, 46.54, 47.61, 43.28, 44.36, 32.23, 36.27, …
eastdat %>% select(June_AvgMaxTF, July_AvgMaxTF, Aug_AvgMaxTF, AvgAnnMaxTF, TotpercInch) %>%
select(where(~is.numeric(.x))) %>%
as.data.frame() %>%
stargazer(., type = "text", title = "Summary Statistics", digits = 2,
summary.stat = c("mean", "sd", "min", "median", "max"))
##
## Summary Statistics
## ===============================================
## Statistic Mean St. Dev. Min Median Max
## -----------------------------------------------
## June_AvgMaxTF 82.65 1.93 78.58 82.46 87.54
## July_AvgMaxTF 86.96 2.07 82.29 86.90 90.96
## Aug_AvgMaxTF 85.04 1.80 81.90 85.50 88.38
## AvgAnnMaxTF 67.58 1.23 65.10 67.46 70.77
## TotpercInch 46.18 7.60 32.23 45.87 66.70
## -----------------------------------------------
These distributions show data at the block group level from the years 1980-2020. Data are also available at the block, tract, and county levels.
longdat <- eastdat %>% select(c(GEOID, June_AvgMaxTF, July_AvgMaxTF, Aug_AvgMaxTF, AvgAnnMaxTF, TotpercInch)) %>% pivot_longer(-GEOID, names_to = "measure", values_to = "value")
longdat$measure <- factor(longdat$measure,
levels = c("June_AvgMaxTF", "July_AvgMaxTF", "Aug_AvgMaxTF", "AvgAnnMaxTF", "TotpercInch"))
longdat %>%
ggplot(aes(x = value, fill = measure)) +
scale_fill_viridis(option = "plasma", discrete = TRUE, guide = FALSE) +
geom_histogram() +
facet_wrap(~measure, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
meta %>%
filter(varname %in% c("June_AvgMaxTF", "July_AvgMaxTF", "Aug_AvgMaxTF", "AvgAnnMaxTF", "TotpercInch")) %>%
mutate(label = paste0(varname, ": ", about)) %>%
select(label) %>%
as.list()
$label [1] "June_AvgMaxTF: The average maximum temperature for a daily period over the entire monthly period for the month of June. Converted to Fahrenheit during data clean"
[2] "July_AvgMaxTF: The average maximum temperature for a daily period over the entire monthly period for the month of July. Converted to Fahrenheit during data clean"
[3] "TotpercInch: The total accumulated precipitation over the monthly period of the daily total precipitation, summed into total yearly precipitation. Sum of all forms of precipitation converted to a water-equivalent depth. Converted to inches during data clean"
All of the following maps show data from the year 2020, but data are available for years 1980-2020.
mapdat2020 <- mapdat[which(mapdat$year == 2020),]
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat2020$AvgAnnMaxTF)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat2020,
fillColor = ~pal(mapdat2020$AvgAnnMaxTF),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T),
popup = paste0("GEOID: ", mapdat2020$GEOID, "<br>",
"Temperature in Fahrenhiet: ", mapdat2020$AvgAnnMaxTF)) %>%
leaflet::addLegend("bottomright", pal = pal, values = (mapdat2020$AvgAnnMaxTF),
title = "Average annual <br> temperature <br> in Fahrenheit <br> in 2020", opacity = 0.7)
Monhtly summaries are also available for June and July.
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat2020$Aug_AvgMaxTF)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat2020,
fillColor = ~pal(mapdat2020$Aug_AvgMaxTF),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T),
popup = paste0("GEOID: ", mapdat2020$GEOID, "<br>",
"Temperature in Fahrenhiet: ", mapdat2020$Aug_AvgMaxTF)) %>%
leaflet::addLegend("bottomright", pal = pal, values = (mapdat2020$Aug_AvgMaxTF),
title = "Average August max <br> temperature <br> in Fahrenheit <br> in 2020", opacity = 0.7)
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat2020$TotpercInch)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat2020,
fillColor = ~pal(mapdat2020$TotpercInch),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T
),
popup = paste0("GEOID: ", mapdat2020$GEOID, "<br>",
"Precipitation in Inches: ", mapdat2020$TotpercInch)
) %>%
leaflet::addLegend("bottomright", pal = pal, values = (mapdat2020$TotpercInch),
title = "Annual precipitation <br>in Inches <br>in 2020", opacity = 0.7)
dygraph(cville_sf1x, main = "Average maximum annual temperature for each county over time", ylab = "Temperature (F)") %>%
dySeries("Accomack", label = "Accomack") %>%
dySeries("Northampton", label = "Northampton") %>%
dyHighlight(highlightCircleSize = 3,
highlightSeriesBackgroundAlpha = 0.2,
hideOnMouseOut = FALSE, highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyLegend(show = "always", hideOnMouseOut = FALSE, width = 400) %>%
dyRangeSelector(height = 20) %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))
dygraph(cville_sf1x, main = "Average maximum August temperature for each county over time", ylab = "Temperature (F)") %>%
dySeries("Accomack", label = "Accomack") %>%
dySeries("Northampton", label = "Northampton") %>%
dyHighlight(highlightCircleSize = 3,
highlightSeriesBackgroundAlpha = 0.2,
hideOnMouseOut = FALSE, highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyLegend(show = "always", hideOnMouseOut = FALSE, width = 400) %>%
dyRangeSelector(height = 20) %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))
dygraph(cville_sf1x, main = "Annual precipitation for each county over time", ylab = "Precipitation (In)") %>%
dySeries("Accomack", label = "Accomack") %>%
dySeries("Northampton", label = "Northampton") %>%
dyHighlight(highlightCircleSize = 3,
highlightSeriesBackgroundAlpha = 0.2,
hideOnMouseOut = FALSE, highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyLegend(show = "always", hideOnMouseOut = FALSE, width = 400) %>%
dyRangeSelector(height = 20) %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))